from sqlalchemy.orm import sessionmaker

import model.model
from model.base import getdb


class users:
    def __init__(self):
        pass

    def getuser(self):
        db = getdb()
        obj_session = sessionmaker(db)
        db_session = obj_session()
        all_list = db_session.query(model.model.User).limit(10).offset(0).all()
        for obj in all_list:
            print(obj.id, obj.phone)
